<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>用户中心</title>
    <script src="/js/config.js"></script>
</head>
<body>
<input id="btn" type="button" value="获取编号" />
<input id="btnJf" type="button" value="获取积分余额" />
<input id="loginout" type="button" value="注销账号" />
<script src="/js/jquery.js"></script>
<script>

    $(document).ready(function () {

        $("#btn").click(function () {

            $.ajax({
                url: apiurl+"/API/user/JsonUserNoList",
                type: "GET",
                dataType: "json", //指定服务器返回的数据类型
                success: function(result) {
                    if(result.msgCode=="000000")
                    {
                        alert(result.data);
                    }
                    else
                    {
                        alert(result.errorDetail);
                    }
                }
            });

        });

        $("#btnJf").click(function () {

            $.ajax({
                url: apiurl+"/API/user/getBalance?classify=1",
                type: "GET",
                dataType: "json", //指定服务器返回的数据类型
                success: function(result) {
                    if(result.msgCode=="000000")
                    {
                        alert(result.data);
                    }
                    else
                    {
                        alert(result.errorDetail);
                    }
                }
            });

        });

        $("#loginout").click(function () {

            $.ajax({
                url: apiurl+"/API/user/JsonUserNoOut",
                type: "GET",
                dataType: "json", //指定服务器返回的数据类型
                success: function(result) {
                    if(result.msgCode=="000000")
                    {
                        alert("注销成功!!");
                        window.location="/login.html";
                    }
                    else
                    {
                        alert(result.errorDetail);
                    }
                }
            });

        });

    });
</script>
</body>
</html>